* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'SF Pro Display', 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #0f172a;
    color: #f1f5f9;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-image: url('/night.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: filter 0.3s ease;
}

body.power-saving-mode {
    filter: brightness(0.8);
}

.container {
    background-color: rgba(30, 41, 59, 0.95);
    border-radius: 24px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    padding: 24px;
    width: 95%;
    max-width: 1200px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    min-height: 80vh;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

h1 {
    text-align: left;
    margin-bottom: 24px;
    color: #f1f5f9;
    font-size: 1.8rem;
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

h1 svg {
    margin-right: 12px;
    fill: #38bdf8;
}

.recorder-panel {
    margin-bottom: 20px;
}

.main-content {
    display: flex;
    flex-direction: column;
}

.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    order: -1; 
}

.btn {
    padding: 12px 18px;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    font-weight: 600;
    flex: 1;
    min-width: 120px;
    transition: all 0.3s ease;
    background-color: #334155;
    color: #f1f5f9;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    margin-bottom: 8px;
}

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.1), rgba(255,255,255,0));
    border-radius: 16px;
    pointer-events: none;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn:hover:not(:disabled) {
    background-color: #475569;
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(0,0,0,0.2), 0 3px 6px rgba(0,0,0,0.1);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

#startBtn {
    order: 1;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: white;
}

#startBtn:hover:not(:disabled) {
    background: linear-gradient(135deg, #0284c7, #0369a1);
}

#stopBtn {
    order: 2;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

#stopBtn:hover:not(:disabled) {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

#streamVideoBtn {
    order: 3;
    background-color: #2d2d2d;
    color: #e0e0e0;
}

#streamVideoBtn:hover:not(:disabled) {
    background-color: #3d3d3d;
}

#downloadBtn {
    order: 4;
    background-color: #2d2d2d;
    color: #e0e0e0;
}

#downloadBtn:hover:not(:disabled) {
    background-color: #3d3d3d;
}

#breakBtn {
    background-color: #eb0400;
    color: white;
    order: 4;
}

#breakBtn:hover:not(:disabled) {
    background-color: #c00;
}

#endBreakBtn {
    background-color: #23bd0f;
    color: white;
    order: 4;
}

#endBreakBtn:hover:not(:disabled) {
    background-color: #1a9a0c;
}

#enableAudioBtn {
    background-color: #0084ff;
    color: white;
    padding: 8px 12px;
    width: auto;
    transition: background-color 0.2s ease;
}

#enableAudioBtn:hover:not(:disabled) {
    background-color: #0066cc;
}

#enableAudioBtn.disabled {
    background-color: #eb0400;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.status {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 12px 16px;
    background-color: #334155;
    border-radius: 16px;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.viewer-count {
    display: flex;
    align-items: center;
    gap: 5px;
    background-color: #334155;
    padding: 8px 12px;
    border-radius: 16px;
    margin-bottom: 15px;
    font-weight: bold;
    color: #0084ff;
}

.viewer-count svg {
    fill: #0084ff;
    width: 16px;
    height: 16px;
}

.preview-container {
    width: 100%;
    background-color: #1e293b;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 16/9;
    margin-bottom: 15px;
    position: relative;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.break-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
}

.break-overlay img {
    max-width: 80%;
    max-height: 60%;
    margin-bottom: 20px;
}

.preview-viewer-count {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(15, 25, 47, 0.8);
    border-radius: 10px;
    padding: 4px 8px;
    color: #0084ff;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    font-weight: bold;
    z-index: 10;
}

.preview-viewer-count svg {
    fill: #0084ff;
    width: 14px;
    height: 14px;
}

#timer {
    font-weight: bold;
    color: #eb0400;
}

#recordingStatus {
    color: #adadb8;
}

#preview {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #1e293b;
}

.mute-chat-container {
    background-color: #2d2d2d;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.mute-chat-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    width: 100%;
    font-weight: bold;
}

.mute-chat-label input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
}

.mute-text {
    color: #ff0000;
    font-size: 1.1rem;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #334155;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
}

input:checked + .toggle-slider:before {
    transform: translateX(30px);
}

.ai-interval-container, .toggle-container {
    background-color: #334155;
    padding: 10px 15px;
    border-radius: 12px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-interval-container label, .toggle-container .toggle-label {
    margin-right: 10px;
    color: #adadb8;
}

/* Chat Settings */
.chat-settings {
    background-color: #334155;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 15px;
}

.chat-settings h3 {
    margin-bottom: 12px;
    color: #e0e0e0;
    font-size: 1rem;
}

.checkbox-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
}

.checkbox-wrapper input[type="checkbox"] {
    display: none;
}

.checkbox-wrapper label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 14px;
    background-color: #334155;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    color: #cbd5e1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.checkbox-wrapper input[type="checkbox"]:checked + label {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.checkbox-wrapper label:hover {
    background-color: #3a6cb5;
}

.checkbox-wrapper input[type="checkbox"]:checked + label:hover {
    background-color: #0066cc;
}

.instructions {
    background-color: #334155;
    padding: 15px;
    border-radius: 12px;
}

h2 {
    margin-bottom: 12px;
    color: #e0e0e0;
    font-size: 1.2rem;
}

ol {
    padding-left: 20px;
    color: #adadb8;
}

li {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.settings-note {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #adadb8;
}

/* Chat Panel Styles */
.chat-panel {
    background-color: rgba(30, 41, 59, 0.95);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    height: calc(100% - 35px);
    position: relative;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.chat-header {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-header-viewers {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: #adadb8;
}

.chat-header-viewers svg {
    fill: #bb86fc;
    width: 14px;
    height: 14px;
}

.popout-btn {
    background: none;
    border: none;
    color: #0084ff;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.popout-btn svg {
    width: 16px;
    height: 16px;
    margin-left: 5px;
    fill: currentColor;
}

.popout-btn:hover {
    color: #0066cc;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 500px;
}

.popup-chat {
    background-color: #2d2d2d;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.popup-chat .chat-messages {
    max-height: none;
}

.message {
    display: flex;
    margin-bottom: 8px;
}

.username {
    font-weight: bold;
    margin-right: 6px;
}

.chat-input-container {
    padding: 14px;
    border-top: 1px solid #333333;
    display: flex;
}

#chatInput {
    flex: 1;
    padding: 12px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: #334155;
    color: #f1f5f9;
    margin-right: 8px;
    transition: all 0.3s ease;
}

#chatInput:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
    outline: none;
}

#sendBtn {
    padding: 12px 18px;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: white;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

#sendBtn:hover {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(0,0,0,0.2);
}

#sendBtn:active {
    transform: translateY(0);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.message-content {
    color: #dedee3;
    word-break: break-word;
}

.chat-emote {
    height: 1em;
    width: auto;
    vertical-align: middle;
    margin: 0 2px;
}

.chat-info {
    margin-top: 10px;
    padding: 12px;
    background-color: #334155;
    border-radius: 16px;
    font-size: 0.8rem;
    color: #adadb8;
    line-height: 1.4;
}

.chat-info h3 {
    color: #64ffda;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.stream-commands {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #274e83;
}

.stream-commands code {
    background-color: #0f192f;
    padding: 2px 5px;
    border-radius: 4px;
    color: #0084ff;
    font-family: monospace;
}

/* Poll Feature Styles */
.poll-container {
    background-color: #334155;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 15px;
}

.poll-container h3 {
    margin-bottom: 12px;
    color: #e0e0e0;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.poll-container h3 button {
    background-color: #0084ff;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 0.8rem;
    cursor: pointer;
}

.poll-container h3 button:hover {
    background-color: #0066cc;
}

.poll-form {
    margin-bottom: 15px;
}

.poll-form input {
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 10px;
    border: none;
    border-radius: 4px;
    background-color: #274e83;
    color: #e0e0e9;
}

.poll-form .option-container {
    display: flex;
    margin-bottom: 10px;
}

.poll-form .option-container input {
    flex: 1;
    margin-bottom: 0;
    margin-right: 10px;
}

.poll-form .option-container button {
    background-color: #eb0400;
    color: white;
    border: none;
    border-radius: 8px;
    width: 30px;
    cursor: pointer;
}

.add-option-btn {
    padding: 8px 12px;
    background-color: #334155;
    color: #e0e0e9;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: center;
}

.add-option-btn:hover {
    background-color: #274e83;
}

.create-poll-btn {
    padding: 8px 12px;
    background-color: #0084ff;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    width: 100%;
}

.create-poll-btn:hover {
    background-color: #0066cc;
}

.active-poll {
    padding: 10px;
    background-color: #334155;
    border-radius: 12px;
}

.active-poll-title {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 1rem;
}

.poll-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.poll-option {
    position: relative;
    background-color: #274e83;
    border-radius: 10px;
    padding: 8px 10px;
    cursor: pointer;
    overflow: hidden;
}

.poll-option:hover {
    background-color: #3a6cb5;
}

.poll-option-text {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.poll-option-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: rgba(0, 132, 255, 0.3);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.poll-timer {
    height: 4px;
    background-color: #274e83;
    border-radius: 2px;
    margin-top: 15px;
    overflow: hidden;
}

.poll-timer-bar {
    height: 100%;
    background-color: #0084ff;
    width: 100%;
    transition: width linear 1s;
}

.poll-votes {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.8rem;
    color: #adadb8;
}

.poll-close-btn {
    margin-top: 10px;
    padding: 6px 12px;
    background-color: #eb0400;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    width: 100%;
    font-size: 0.9rem;
}

.poll-close-btn:hover {
    background-color: #c00;
}

.poll-status {
    margin-top: 10px;
    text-align: center;
    font-weight: bold;
    color: #0084ff;
}

#activePollContainer {
    margin-bottom: 15px;
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #2d2d2d;
}

#aiIntervalSelect {
    padding: 6px 10px;
    background-color: #274e83;
    color: #e0e0e9;
    border: none;
    border-radius: 10px;
    flex: 0.7; 
    cursor: pointer;
}

#aiIntervalSelect:hover {
    background-color: #3a6cb5;
}

/* Poll Form Input Styles */
#pollFormContainer input[type="text"],
#pollFormContainer input[type="number"] {
    background-color: #274e83;
    border: 1px solid #3a6cb5;
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 10px;
    width: 100%;
    color: #e0e0e9;
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}
#pollFormContainer input[type="text"]:focus,
#pollFormContainer input[type="number"]:focus {
    border-color: #0084ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 132, 255, 0.2);
}

#pollFormContainer .option-container {
    margin-bottom: 8px;
}

#pollFormContainer .option-container button {
    background-color: #4d4d4d;
    transition: background-color 0.2s ease;
}

#pollFormContainer .option-container button:hover {
    background-color: #eb0400;
}

#pollFormContainer .create-poll-btn {
    margin-top: 5px;
    font-weight: 500;
}

#chatInput, 
#usernameInput,
#pollFormContainer input[type="text"],
#pollFormContainer input[type="number"] {
    background-color: #334155;
    border: 1px solid #274e83;
    border-radius: 12px;
    color: #f1f5f9;
    padding: 14px 16px;
}

#chatInput:focus, 
#usernameInput:focus,
#pollFormContainer input[type="text"]:focus,
#pollFormContainer input[type="number"]:focus {
    outline: none;
    border-color: #0084ff;
    box-shadow: 0 0 0 2px rgba(0, 132, 255, 0.2);
}

#sendBtn, 
.create-poll-btn {
    padding: 12px 18px;
    background-color: #0084ff;
    color: white;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}

#sendBtn:hover, 
.create-poll-btn:hover {
    background-color: #0066cc;
    box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
}

/* Donation Button Styles */
#donateBtn {
    background-color: #0084ff;
    color: white;
    margin-top: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    font-size: 1.1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#donateBtn:hover {
    background-color: #0066cc;
}

#donateBtn svg {
    margin-right: 8px;
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.donate-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.donate-popup.active {
    display: flex;
}

.donate-container {
    background-color: #1f3a60;
    border-radius: 16px;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.donate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333333;
}

.donate-header h3 {
    color: #e0e0e0;
    font-size: 1.2rem;
    margin: 0;
}

.donate-close {
    background: none;
    border: none;
    color: #adadb8;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.donate-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.donate-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.donate-row label {
    color: #adadb8;
    font-size: 0.9rem;
}

.donate-row input, 
.donate-row textarea,
.donate-row select {
    padding: 10px;
    background-color: #274e83;
    border: 1px solid #3a6cb5;
    border-radius: 10px;
    color: #e0e0e9;
}

.donate-row textarea {
    resize: vertical;
    min-height: 80px;
}

.donate-row input:focus, 
.donate-row textarea:focus,
.donate-row select:focus {
    border-color: #0084ff;
    outline: none;
}

.donate-type {
    display: flex;
    gap: 10px;
}

.donate-type label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.donate-submit {
    background-color: #0084ff;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
    transition: background-color 0.2s ease;
}

.donate-submit:hover {
    background-color: #0066cc;
}

.bits-option {
    color: #0084ff;
}

.dollars-option {
    color: #64ffda;
}

/* Donation Styles */
.donation-message {
    background-color: rgba(56, 189, 248, 0.1);
    border-left: 3px solid #38bdf8;
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 0 16px 16px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.bits-donation {
    border-left: 3px solid #38bdf8;
    background-color: rgba(56, 189, 248, 0.1);
}

.dollars-donation {
    border-left: 3px solid #4ade80;
    background-color: rgba(74, 222, 128, 0.1);
}

.bits-donation .donation-amount {
    color: #0084ff;
}

.dollars-donation .donation-amount {
    color: #64ffda;
}

.donation-amount {
    color: #0084ff;
    font-weight: bold;
    margin-right: 5px;
}

.donation-username {
    font-weight: bold;
}

.donation-text {
    color: #e0e0e9;
    margin-top: 4px;
}

/* Stream Settings Container */
.stream-settings-container {
    background-color: #334155;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 15px;
}

.stream-settings-container h3 {
    margin-bottom: 12px;
    color: #e0e0e0;
    font-size: 1rem;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #274e83;
}

.setting-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.setting-label {
    color: #adadb8;
}

/* Custom color variations for usernames */
.color-1 { color: #f97316; } /* Orange */
.color-2 { color: #38bdf8; } /* Sky Blue */
.color-3 { color: #4ade80; } /* Green */
.color-4 { color: #a78bfa; } /* Purple */
.color-5 { color: #fb7185; } /* Pink */
.color-6 { color: #f43f5e; } /* Red */
.subscriber-badge {
    color: #0084ff;
    margin-left: 4px;
    font-size: 0.9em;
}

.ai-chat-btn {
    background-color: #0084ff;
    color: white;
    border: none;
    border-radius: 12px;
    margin-left: 8px;
    padding: 0 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}

.ai-chat-btn:hover {
    background-color: #0066cc;
    box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
}

.ai-chat-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.ai-chat-modal.active {
    display: flex;
}

.ai-chat-container {
    background-color: rgba(30, 41, 59, 0.95);
    border-radius: 24px;
    padding: 24px;
    width: 90%;
    max-width: 800px;
    height: 80vh;
    max-height: 700px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.ai-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #274e83;
}

.ai-chat-header h3 {
    color: #e0e0e0;
    font-size: 1.2rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-chat-close {
    background: none;
    border: none;
    color: #adadb8;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 15px;
    padding-right: 10px;
}

.ai-message {
    display: flex;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.ai-message:last-child {
    border-bottom: none;
}

.ai-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
    flex-shrink: 0;
}

.ai-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ai-message-content {
    color: #f1f5f9;
    line-height: 1.5;
    max-width: calc(100% - 55px - 40px); /* avatar width + actions width */
}

.ai-message-content p {
    margin: 0 0 10px;
}

.ai-message-content p:last-child {
    margin-bottom: 0;
}

.ai-message-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

.ai-message-content li {
    margin-bottom: 5px;
}

.ai-message-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 10px 0;
}

.ai-message-actions {
    position: absolute;
    right: 0;
    top: 0;
    display: flex;
    gap: 10px;
}

.ai-action-btn {
    background-color: transparent;
    border: none;
    color: #adadb8;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.ai-action-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}

.ai-action-btn.active {
    color: #0084ff;
}

.ai-user-message {
    background-color: rgba(56, 189, 248, 0.1);
    border-radius: 12px;
    padding: 12px 15px;
    margin-bottom: 15px;
    align-self: flex-end;
    color: #f1f5f9;
    max-width: 80%;
}

.ai-chat-input {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 15px;
    background-color: rgba(15, 23, 42, 0.3);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#aiChatInput {
    flex: 1;
    height: 60px;
    padding: 12px 15px;
    background-color: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #f1f5f9;
    resize: none;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
}

#aiChatInput:focus {
    outline: none;
    border-color: #0084ff;
}

.ai-chat-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ai-voice-btn, .ai-send-btn {
    background-color: #0084ff;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.ai-voice-btn:hover, .ai-send-btn:hover {
    background-color: #0066cc;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.ai-voice-btn:active, .ai-send-btn:active {
    transform: translateY(0);
}

.ai-voice-btn.active {
    background-color: #dc2626;
}

.ai-voice-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(15, 23, 42, 0.9);
    padding: 15px 25px;
    border-radius: 30px;
    display: none;
    align-items: center;
    gap: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-voice-indicator.active {
    display: flex;
}

.ai-voice-waves {
    display: flex;
    align-items: center;
    height: 20px;
}

.ai-voice-waves span {
    display: inline-block;
    width: 3px;
    height: 100%;
    background-color: #0084ff;
    margin: 0 2px;
    border-radius: 3px;
    animation: voice-wave 1.2s infinite ease-in-out;
}

.ai-voice-waves span:nth-child(2) {
    animation-delay: 0.2s;
}

.ai-voice-waves span:nth-child(3) {
    animation-delay: 0.4s;
}

.ai-voice-waves span:nth-child(4) {
    animation-delay: 0.6s;
}

.ai-voice-waves span:nth-child(5) {
    animation-delay: 0.8s;
}

@keyframes voice-wave {
    0%, 100% {
        height: 5px;
    }
    50% {
        height: 20px;
    }
}

.ai-voice-indicator p {
    color: #f1f5f9;
    margin: 0;
    font-size: 0.9rem;
}

.ai-stop-voice-btn {
    background-color: #dc2626;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
}

.ai-stop-voice-btn:hover {
    background-color: #b91c1c;
}

.ai-image-result {
    margin: 10px 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-image-result img {
    max-width: 100%;
    display: block;
}

.ai-search-result {
    background-color: rgba(15, 23, 42, 0.6);
    border-radius: 8px;
    padding: 10px 15px;
    margin: 10px 0;
    border-left: 3px solid #0084ff;
}

.ai-search-result h4 {
    margin: 0 0 5px;
    color: #38bdf8;
}

.ai-search-result p {
    margin: 0;
    font-size: 0.9rem;
}

.ai-search-result a {
    color: #38bdf8;
    text-decoration: none;
}

.ai-search-result a:hover {
    text-decoration: underline;
}

.ai-calc-result {
    background-color: rgba(15, 23, 42, 0.6);
    border-radius: 8px;
    padding: 10px 15px;
    margin: 10px 0;
    display: flex;
    align-items: center;
}

.ai-calc-expression {
    color: #adadb8;
    margin-right: 10px;
}

.ai-calc-answer {
    font-size: 1.2rem;
    font-weight: bold;
    color: #4ade80;
}

.ai-typing {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #adadb8;
    font-style: italic;
    margin-top: 5px;
}

.ai-typing-dots {
    display: flex;
}

.ai-typing-dots span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #adadb8;
    margin: 0 1px;
    opacity: 0.7;
    animation: typing-dot 1.4s infinite ease-in-out;
}

.ai-typing-dots span:nth-child(1) {
    animation-delay: 0s;
}

.ai-typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.ai-typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-dot {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 1;
    }
}

.meeting-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.meeting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #1f3a60;
    color: white;
    font-weight: bold;
}

.meeting-controls {
    display: flex;
    gap: 10px;
}

.meeting-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mic-on {
    background-color: #23bd0f;
    color: white;
}

.mic-off {
    background-color: #eb0400;
    color: white;
}

.screen-on {
    background-color: #0084ff;
    color: white;
}

.screen-off {
    background-color: #2d2d2d;
    color: white;
}

.end-meeting {
    background-color: #eb0400;
    color: white;
}

.meeting-participants {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    gap: 10px;
    flex: 0 0 auto;
}

.meeting-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 10px;
    background-color: #0f192f;
    border-radius: 10px;
    margin: 0 10px 10px;
}

.meeting-chat-messages {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 10px;
}

.meeting-chat-input {
    display: flex;
    gap: 10px;
}

.meeting-chat-input input {
    flex: 1;
    padding: 8px 12px;
    border-radius: 12px;
    border: none;
    background-color: #1f3a60;
    color: #e0e0e0;
}

.meeting-chat-input button {
    padding: 8px 12px;
    background-color: #0084ff;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
}

.meeting-message {
    margin-bottom: 8px;
    padding: 6px 10px;
    border-radius: 10px;
    max-width: 80%;
}

.meeting-message.self {
    align-self: flex-end;
    background-color: #0084ff;
    color: white;
    margin-left: auto;
}

.meeting-message.guest {
    background-color: #1f3a60;
    color: #e0e0e0;
}

.meeting-message.system {
    background-color: rgba(0, 0, 0, 0.5);
    color: #adadb8;
    text-align: center;
    width: 100%;
    font-style: italic;
    font-size: 0.8rem;
}

.meeting-username {
    font-weight: bold;
    margin-right: 5px;
}

.superchat-donation {
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    border-left: none;
    font-weight: 500;
}

.superchat-donation .donation-username {
    font-weight: bold;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.superchat-donation .donation-amount {
    font-weight: bold;
    color: inherit;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.superchat-donation .donation-text {
    margin-top: 8px;
    font-size: 1.05rem;
}

#facecam {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 25%;
    height: auto;
    aspect-ratio: 4/3;
    border-radius: 8px;
    border: 2px solid #0084ff;
    background-color: #121a2b;
    display: none;
    z-index: 5;
    object-fit: cover;
}

.voice-message-ui {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(15, 25, 47, 0.8);
    padding: 10px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 20;
}

.voice-msg-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background-color: #0084ff;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 500;
}

.voice-msg-btn:hover {
    background-color: #0066cc;
}

.voice-msg-btn.stop {
    background-color: #eb0400;
    margin-left: 10px;
}

.voice-msg-btn.stop:hover {
    background-color: #c00;
}

#voiceRecordingStatus {
    display: flex;
    align-items: center;
    color: white;
}

.voice-message audio {
    margin-top: 5px;
    max-width: 200px;
}

.meeting-message.voice-message {
    display: flex;
    flex-direction: column;
}

/* AI Streamer Overlay Styles */
.ai-streamer-overlay {
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: 35%;
    max-width: 300px;
    z-index: 5;
    pointer-events: none;
}

.ai-streamer-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.ai-streamer-visual {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #0084ff;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    margin-bottom: 10px;
}

.ai-streamer-visual img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ai-streamer-speech-bubble {
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid #0084ff;
    border-radius: 16px;
    padding: 12px;
    max-width: 250px;
    position: relative;
    margin-left: 40px;
    margin-top: -60px;
    transform-origin: bottom left;
    animation: popIn 0.3s ease-out;
}

.ai-streamer-speech-bubble:before {
    content: '';
    position: absolute;
    left: -10px;
    bottom: 20px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-right: 12px solid rgba(15, 23, 42, 0.8);
    border-bottom: 10px solid transparent;
}

.ai-streamer-speech-bubble p {
    margin: 0;
    color: #f1f5f9;
    font-size: 0.9rem;
}

@keyframes popIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    70% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* AI Streamer Config Panel Styles */
.ai-streamer-config-panel {
    background-color: #1a3053;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 15px;
    border: 1px solid #0084ff;
}

.ai-streamer-config-panel h3 {
    color: #0084ff;
    font-size: 1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-badge {
    background-color: #0084ff;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

.ai-streamer-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.file-upload-row {
    align-items: flex-start;
}

.file-upload-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.upload-btn {
    background-color: #0084ff;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.9rem;
}

#uploadImageName {
    font-size: 0.8rem;
    color: #adadb8;
}

.ai-streamer-preview {
    background-color: #0f192f;
    padding: 15px;
    border-radius: 10px;
    margin-top: 10px;
}

.ai-streamer-preview h4 {
    color: #e0e0e0;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.ai-preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

#aiStreamerPreviewImage {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: contain;
    border: 2px solid #0084ff;
}

#aiStreamerPreviewName {
    font-size: 0.9rem;
    color: #f1f5f9;
    font-weight: bold;
}

.ai-save-btn {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: white;
    margin-top: 15px;
}

.ai-save-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #0284c7, #0369a1);
}

/* AI Streamer Popup Styles */
.ai-streamer-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.ai-streamer-popup.active {
    display: flex;
}

.ai-streamer-popup-container {
    background-color: rgba(30, 41, 59, 0.95);
    border-radius: 24px;
    padding: 24px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.ai-streamer-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #274e83;
}

.ai-streamer-popup-header h3 {
    color: #e0e0e0;
    font-size: 1.2rem;
    margin: 0;
}

.ai-streamer-popup-close {
    background: none;
    border: none;
    color: #adadb8;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.ai-streamer-popup-section {
    margin-bottom: 20px;
}

.ai-streamer-popup-section h4 {
    color: #0084ff;
    font-size: 1rem;
    margin-bottom: 10px;
}

.personality-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.personality-option {
    flex: 0 0 calc(33.33% - 10px);
}

.personality-option input[type="radio"] {
    display: none;
}

.personality-option label {
    display: block;
    padding: 10px;
    text-align: center;
    background-color: #1f3a60;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #e0e0e0;
}

.personality-option input[type="radio"]:checked + label {
    background-color: #0084ff;
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.appearance-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.appearance-option {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #1f3a60;
    cursor: pointer;
    transition: all 0.3s ease;
}

.appearance-option img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.appearance-option.selected {
    border-color: #0084ff;
    box-shadow: 0 0 15px rgba(0, 132, 255, 0.5);
}

.upload-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #1f3a60;
    color: #e0e0e0;
    font-size: 0.8rem;
}

.upload-icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.name-voice-container {
    display: flex;
    gap: 15px;
}

.name-input-container,
.voice-select-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.name-input-container label,
.voice-select-container label {
    color: #adadb8;
    font-size: 0.9rem;
}

.name-input-container input,
.voice-select-container select {
    padding: 10px;
    background-color: #1f3a60;
    border: 1px solid #274e83;
    border-radius: 10px;
    color: #e0e0e0;
}

.behavior-settings {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.behavior-setting {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.behavior-setting label {
    color: #e0e0e0;
}

.ai-streamer-popup-footer {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

.ai-streamer-popup-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.ai-streamer-popup-btn:hover {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(0,0,0,0.2);
}

@media (max-width: 800px) {
    .container {
        grid-template-columns: 1fr;
        padding: 20px;
        width: 100%;
        min-height: auto;
    }
    
    .controls {
        flex-direction: row;
    }
    
    .btn {
        width: auto;
        padding: 12px;
        font-size: 0.9rem;
    }
    
    .chat-panel {
        max-height: 400px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .chat-settings .checkbox-container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    
    .checkbox-wrapper {
        flex: 0 0 48%;
        margin-bottom: 6px;
    }
    
    .checkbox-wrapper label {
        padding: 8px 14px;
        font-size: 0.8rem;
        width: 100%;
        justify-content: center;
    }
    
    .preview-container {
        aspect-ratio: 4/3;  
    }
}

@media (max-width: 480px) {
    .controls {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 5px;
    }
    
    h1 {
        font-size: 1.3rem;
    }
    
    .chat-settings .checkbox-container {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .checkbox-wrapper {
        flex: 0 0 100%;
        margin-bottom: 5px;
    }
    
    .preview-container {
        aspect-ratio: 1/1;  
    }
}

.whats-new-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.whats-new-popup.active {
    display: flex;
}

.whats-new-container {
    background-color: rgba(30, 41, 59, 0.95);
    border-radius: 24px;
    padding: 24px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.whats-new-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #274e83;
}

.whats-new-header h3 {
    color: #e0e0e0;
    font-size: 1.2rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.version-badge {
    background-color: #0084ff;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: bold;
}

.whats-new-close {
    background: none;
    border: none;
    color: #adadb8;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.feature-item {
    display: flex;
    gap: 10px;
}

.feature-icon {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.feature-icon svg {
    width: 16px;
    height: 16px;
    stroke: white;
}

.feature-details {
    flex: 1;
}

.feature-title {
    font-weight: bold;
    margin-bottom: 5px;
    color: #e0e0e0;
}

.feature-description {
    color: #adadb8;
    font-size: 0.9rem;
    line-height: 1.4;
}

.update-btn {
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    color: white;
    order: 5;
}

.update-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #0284c7, #1d4ed8);
}

.reset-btn {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: white;
    order: 6;
}

.reset-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #dc2626, #991b1b);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.viewer-analytics-panel {
    background-color: #1f3a60;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #0084ff;
}

.viewer-analytics-panel h3 {
    color: #0084ff;
    font-size: 1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pro-badge {
    background-color: #0084ff;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

.beta-badge {
    background-color: #e1c118;
    color: black;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

.analytics-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.analytics-chart {
    flex: 1;
    min-width: 300px;
    background-color: #0f192f;
    padding: 15px;
    border-radius: 10px;
}

.analytics-metrics {
    flex: 0 0 250px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.metric-row {
    background-color: #0f192f;
    padding: 10px 15px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.metric-label {
    color: #adadb8;
    font-size: 0.9rem;
}

.metric-value {
    color: #64ffda;
    font-weight: bold;
    font-size: 1.1rem;
}

.viewer-demographics {
    background-color: #0f192f;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.viewer-demographics h4 {
    color: #e0e0e0;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.demographics-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.demographic-item {
    padding: 8px 10px;
    border-bottom: 1px solid #274e83;
}

.demographic-item:last-child {
    border-bottom: none;
}

.demographic-title {
    color: #adadb8;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.demographic-data {
    color: #e0e0e9;
    font-size: 0.9rem;
}

.shitty-features {
    background-color: #0f192f;
    padding: 15px;
    border-radius: 10px;
}

.shitty-features h4 {
    color: #e0e0e0;
    font-size: 0.9rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.feature-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #274e83;
}

.feature-row:last-child {
    border-bottom: none;
}

.feature-name {
    color: #e0e0e0;
}

.tts-controls {
    background-color: #1f3a60;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
}

.tts-controls h3 {
    color: #23bd0f;
    font-size: 1rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tts-input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.tts-input {
    flex: 1;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #274e83;
    background-color: #0f192f;
    color: #e0e0e9;
}

.tts-button {
    padding: 10px 15px;
    background-color: #23bd0f;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.tts-button:hover {
    background-color: #1a9a0c;
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0,0,0,0.15);
}

.tts-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.tts-option-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 150px;
}

.tts-option-label {
    font-size: 0.9rem;
    color: #adadb8;
}

.tts-select, .tts-range {
    padding: 8px;
    background-color: #274e83;
    color: #e0e0e9;
    border: none;
    border-radius: 8px;
}

.voice-preview {
    margin-top: 10px;
    padding: 10px;
    background-color: #0f192f;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.recent-tts {
    margin-top: 15px;
}

.recent-tts-title {
    font-size: 0.9rem;
    color: #adadb8;
    margin-bottom: 8px;
}

.recent-tts-item {
    padding: 8px 10px;
    background-color: #0f192f;
    border-radius: 8px;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recent-tts-text {
    font-size: 0.9rem;
    color: #e0e0e9;
}

.recent-tts-replay {
    background: none;
    border: none;
    color: #0084ff;
    cursor: pointer;
}

.btn-fixed {
    padding: 10px 16px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    background-color: #1f3a60;
    color: #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-fixed:hover:not(:disabled) {
    background-color: #274e83;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.update-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.update-popup.active {
    display: flex;
}

.update-container {
    background-color: rgba(30, 41, 59, 0.95);
    border-radius: 24px;
    padding: 24px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.update-header {
    margin-bottom: 20px;
    text-align: center;
}

.update-header h3 {
    color: #0084ff;
    font-size: 1.4rem;
    margin: 0;
}

.update-content {
    text-align: center;
}

.update-content p {
    margin-bottom: 20px;
    color: #f1f5f9;
}

.update-progress-container {
    background-color: #0f192f;
    border-radius: 10px;
    height: 20px;
    margin-bottom: 15px;
    overflow: hidden;
}

.update-progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    width: 0%;
    border-radius: 10px;
    transition: width 0.3s ease;
}

.update-percentage {
    color: #38bdf8;
    font-size: 1.2rem;
    font-weight: bold;
}

@media (max-width: 768px) {
    .ai-chat-container {
        width: 95%;
        height: 90vh;
    }
    
    .ai-message-content {
        max-width: calc(100% - 55px - 40px);
    }
}

@media (max-width: 480px) {
    .ai-chat-container {
        padding: 15px;
    }
    
    .ai-message {
        flex-direction: column;
    }
    
    .ai-avatar {
        margin-bottom: 10px;
    }
    
    .ai-message-content {
        max-width: 100%;
    }
    
    .ai-message-actions {
        position: relative;
        justify-content: flex-end;
        margin-top: 10px;
    }
}